package com.bw.a2209clubshop.ui.mall.model

import android.view.View
import com.chad.library.adapter.base.entity.MultiItemEntity

data class MallModel(
    val type:Int,
    val titleList:List<MallGoods>?,
    val goodsList:List<MallGoodsInfo>?,
    val bannerList:List<MallBanner>?
): MultiItemEntity {
    override val itemType: Int
        get() = type
}

data class MallGoods(
    val code: String,
    val createTime: String,
    val id: Int,
    val mallGoodsInfoPageResponseList: List<MallGoodsInfo>,
    val name: String,
    val operIdCreate: Int,
    val operIdMod: Int,
    val operNameCreate: String,
    val operNameMod: String,
    val parentId: Int,
    val parentName: String,
    val remark: String,
    val sort: Int,
    val type: String,
    val updateTime: String
): MultiItemEntity {

    override val itemType: Int
        get() = id
}

data class MallGoodsInfo(
    val brandCode: String,
    val brandName: String,
    val createTime: String,
    val goodsCode: String,
    val group: MallModelGroup,
    val id: Int,
    val mainImgUrl: String,
    val marketPriceFee: Int,
    val modelCode: String,
    val modelName: String,
    val operIdCreate: Any,
    val operIdMod: Any,
    val operNameCreate: String,
    val operNameMod: String,
    val productType: String,
    val purchasePrice: Int,
    val soldNum: Int,
    val title: String,
    val tlineCode: String,
    val tlineName: String,
    val updateTime: String, override val itemType: Int
):MultiItemEntity{

}

data class MallModelGroup(
    val code: String,
    val createTime: String,
    val id: Int,
    val name: String,
    val operIdCreate: Int,
    val operIdMod: Int,
    val operNameCreate: String,
    val operNameMod: String,
    val parentId: Int,
    val parentName: String,
    val remark: String,
    val sort: Int,
    val type: String,
    val updateTime: String
)
/**
 * 商城相关数据模型
 */
object MallRowTypes {
    const val TITLE = 0
    const val SECKILL_TITLE = 1
    const val BANNER = 2
    //第三方服务二手车，跳蚤市场
    const val THIRD_SERVICE = 22
    // 热门活动
    const val ACTIVITY = 3

    // 秒杀&商品
    const val SECKILL = 4
    const val GOODS = 5

    // 系列大图
    const val PIC = 6

    // 系列富文本
    const val RICH_TXT = 7

    // 推荐商品:最多8个 可以滑动
    const val RECOMMEND = 8

    // 系列
    const val SERIES_PIC_BIG = 11// 大图-方图
    const val SERIES_PIC_SMALL = 12// 一行2个-方图
    const val SERIES_PIC_RECT = 21// 1行1个-长图

}
object MallRowTags {
    const val MORE = "MORE"
    const val ACTIVITY = "ACTIVITY"
    const val SECKILL = "SECKILL"
    const val GOODS = "GOODS"
    const val GOODS_RECOMMEND = "GOODS_RECOMMEND"
    const val GOODS_PART = "GOODS_PART"
    const val SECKILL_GOODS = "SECKILL_GOODS"
    const val BANNER = "BANNER"
    const val BANNER_BOOKING = "BANNER_BOOKING"
    const val BANNER_BUY = "BANNER_BUY"
}